package ua.org.cityid.shared.events;

import com.google.gwt.event.shared.GwtEvent;

public class RegionChangedEvent extends GwtEvent<RegionChangedHandler>{
	private int regionId;
	public static final Type<RegionChangedHandler> TYPE = new Type<RegionChangedHandler>();
	
	
	public RegionChangedEvent(int regionId){
		this.regionId = regionId;
	}
	
	@Override
	protected void dispatch(RegionChangedHandler handler) {
		handler.onRegionChanged(regionId);
		
	}

	@Override
	public Type<RegionChangedHandler> getAssociatedType() {
		return TYPE;
	}

}
